-- GENERATED SPELL FOR [Cosmic Infuser] --


function spell0_21270(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(36983,pUnit)
pUnit:RegisterEvent('Sorts_21270', 2500, 1)
end

function spell1_21270(pUnit, Event) --@Holy Nova,Self--
pUnit:FullCastSpellOnTarget(36985,pUnit)
pUnit:RegisterEvent('Sorts_21270', 581, 1)
end

function Sorts_21270(pUnit, Event)
local choix_sorts_21270 = math.random(0, 1)
if choix_sorts_21270 == 0 then
pUnit:RegisterEvent('spell0_21270', 1, 1)
end
if choix_sorts_21270 == 1 then
pUnit:RegisterEvent('spell1_21270', 1, 1)
end
end

function mob21270_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_21270', math.random(1500, 3000), 1)
end

function mob21270_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21270_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob21270_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(21270, 1, 'mob21270_Action')
RegisterUnitEvent(21270, 2, 'mob21270_Leave')
RegisterUnitEvent(21270, 3, 'mob21270_Kill')
RegisterUnitEvent(21270, 4, 'mob21270_Die')
